#!/bin/sh /etc/rc.common
# shadowvpn init script

START=90
STOP=15
EXTRA_COMMANDS="restart"

start()
{
    shadowvpn \
        -c /etc/shadowvpn/client.conf \
        -s start
}

boot()
{
    if [ ! -c "/dev/net/tun" ]; then
        mkdir -p /dev/net
        mknod /dev/net/tun c 10 200
        chmod 0666 /dev/net/tun
    fi
    start
}

stop()
{
    shadowvpn \
        -c /etc/shadowvpn/client.conf \
        -s stop
}

restart()
{
    shadowvpn \
        -c /etc/shadowvpn/client.conf \
        -s restart
}
